package org.smartopen.unionpay.openapi.service.impl;

import lombok.RequiredArgsConstructor;
import org.smartframework.unionpay.domain.request.SmartProfitSharingFinishRequest;
import org.smartframework.unionpay.domain.request.SmartProfitSharingReceiverRequest;
import org.smartframework.unionpay.domain.request.SmartProfitSharingRequest;
import org.smartframework.unionpay.domain.result.SmartProfitSharingAddReceiverResult;
import org.smartframework.unionpay.domain.result.SmartProfitSharingFinishResult;
import org.smartframework.unionpay.domain.result.SmartProfitSharingRemoveReceiverResult;
import org.smartframework.unionpay.domain.result.SmartProfitSharingResult;
import org.smartopen.unionpay.openapi.service.UnionPayOpenApiProfitSharingService;
import org.smartopen.unionpay.openapi.service.feigin.RemoteUnionPayOpenApiService;

@RequiredArgsConstructor
public class UnionPayOpenApiProfitSharingServiceImpl implements UnionPayOpenApiProfitSharingService {

    private final RemoteUnionPayOpenApiService openApiService;

    @Override
    public SmartProfitSharingResult profitSharing(SmartProfitSharingRequest request) {
        return openApiService.profitSharing(request).serviceData();
    }

    @Override
    public SmartProfitSharingFinishResult profitSharingFinish(SmartProfitSharingFinishRequest request) {
        return openApiService.profitSharingFinish(request).serviceData();
    }

    @Override
    public SmartProfitSharingAddReceiverResult profitSharingAddReceiver(SmartProfitSharingReceiverRequest request) {
        return openApiService.profitSharingAddReceiver(request).serviceData();
    }

    @Override
    public SmartProfitSharingRemoveReceiverResult profitSharingRemoveReceiver(SmartProfitSharingReceiverRequest request) {
        return openApiService.profitSharingRemoveReceiver(request).serviceData();
    }
}
